/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author admin
 */
@Entity
@Table(name = "studente")
@NamedQueries({
    @NamedQuery(name = "Studente.findAll", query = "SELECT s FROM Studente s"),
    @NamedQuery(name = "Studente.findById", query = "SELECT s FROM Studente s WHERE s.id = :id"),
    @NamedQuery(name = "Studente.findByCitta", query = "SELECT s FROM Studente s WHERE s.citta = :citta"),
    @NamedQuery(name = "Studente.findByVia", query = "SELECT s FROM Studente s WHERE s.via = :via"),
    @NamedQuery(name = "Studente.findByCap", query = "SELECT s FROM Studente s WHERE s.cap = :cap"),
    @NamedQuery(name = "Studente.findByTelefono", query = "SELECT s FROM Studente s WHERE s.telefono = :telefono"),
    @NamedQuery(name = "Studente.findByProvincia", query = "SELECT s FROM Studente s WHERE s.provincia = :provincia"),
    @NamedQuery(name = "Studente.findByCognome", query = "SELECT s FROM Studente s WHERE s.cognome = :cognome"),
    @NamedQuery(name = "Studente.findByQuotaIscrizione", query = "SELECT s FROM Studente s WHERE s.quotaIscrizione = :quotaIscrizione"),
    @NamedQuery(name = "Studente.findByCodiceFiscale", query = "SELECT s FROM Studente s WHERE s.codiceFiscale = :codiceFiscale"),
    @NamedQuery(name = "Studente.findByEmail", query = "SELECT s FROM Studente s WHERE s.email = :email"),
    @NamedQuery(name = "Studente.findByCel", query = "SELECT s FROM Studente s WHERE s.cel = :cel"),
    @NamedQuery(name = "Studente.findByDataIscrizione", query = "SELECT s FROM Studente s WHERE s.dataIscrizione = :dataIscrizione"),
    @NamedQuery(name = "Studente.findByNome", query = "SELECT s FROM Studente s WHERE s.nome = :nome")})
public class Studente implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "citta")
    private String citta;
    @Column(name = "via")
    private String via;
    @Column(name = "cap")
    private String cap;
    @Column(name = "telefono")
    private String telefono;
    @Column(name = "provincia")
    private String provincia;
    @Column(name = "cognome")
    private String cognome;
    @Column(name = "quotaIscrizione")
    private Double quotaIscrizione;
    @Column(name = "codiceFiscale")
    private String codiceFiscale;
    @Column(name = "email")
    private String email;
    @Column(name = "cel")
    private String cel;
    @Column(name = "dataIscrizione")
    @Temporal(TemporalType.DATE)
    private Date dataIscrizione;
    @Column(name = "nome")
    private String nome;

    public Studente() {
    }

    public Studente(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCitta() {
        return citta;
    }

    public void setCitta(String citta) {
        this.citta = citta;
    }

    public String getVia() {
        return via;
    }

    public void setVia(String via) {
        this.via = via;
    }

    public String getCap() {
        return cap;
    }

    public void setCap(String cap) {
        this.cap = cap;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    public String getProvincia() {
        return provincia;
    }

    public void setProvincia(String provincia) {
        this.provincia = provincia;
    }

    public String getCognome() {
        return cognome;
    }

    public void setCognome(String cognome) {
        this.cognome = cognome;
    }

    public Double getQuotaIscrizione() {
        return quotaIscrizione;
    }

    public void setQuotaIscrizione(Double quotaIscrizione) {
        this.quotaIscrizione = quotaIscrizione;
    }

    public String getCodiceFiscale() {
        return codiceFiscale;
    }

    public void setCodiceFiscale(String codiceFiscale) {
        this.codiceFiscale = codiceFiscale;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getCel() {
        return cel;
    }

    public void setCel(String cel) {
        this.cel = cel;
    }

    public Date getDataIscrizione() {
        return dataIscrizione;
    }

    public void setDataIscrizione(Date dataIscrizione) {
        this.dataIscrizione = dataIscrizione;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Studente)) {
            return false;
        }
        Studente other = (Studente) object;
        return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id));
    }

    @Override
    public String toString() {
        return "jpa.Studente[id=" + id + "]";
    }

}
